package com.blb.community.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community.mapper.SysDictDataMapper;
import com.blb.community.pojo.SysDictData;
import com.blb.community.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 字典数据表 服务实现类
 * </p>
 *
 * @author gch
 * @since 2023-12-06
 */
@Service
public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDictData> implements ISysDictDataService {

    @Autowired
    private SysDictDataMapper sysDictDataMapper;

    @Override
    public List<SysDictData> getDictTypeByOwnerState() {
        return sysDictDataMapper.selectDictTypeByOwnerState();
    }

    @Override
    public String getByOwnerRoomKey(String key) {
        SysDictData sysDictData = sysDictDataMapper.selectByOwnerRoomKey(key);
        return sysDictData.getDictLabel();
    }
}
